package com.hoangkien.util;

import java.util.ArrayList;

import com.hoangkien.config.SCConfig;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class SoundCloudSharePreference {
	private SharedPreferences preferences;
	
	public SoundCloudSharePreference(Context context) {
		preferences = context.getSharedPreferences(SCConfig.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE);
	}
	
	public String getStringSearch(Context context) {
		return preferences.getString(SCConfig.STRING_SEARCH, "");
	}

	public  void setStringSearch(Context context,String keysearch){
		String current_string_search = this.getStringSearch(context);
		String change_string_search = current_string_search + keysearch+",";
		Editor editor = preferences.edit();
		editor.putString(SCConfig.STRING_SEARCH, change_string_search);
		editor.commit();
	}
}
